var attempt = 0;
while (attempt < 5) {
	// 继续尝试...
	attempt++;
	console.log(attempt);
}
console.log('loop stopped');

console.log('attempt ', attempt);
